package com.kk.base.dao.admin;

import com.kk.base.entity.admin.AgingQuery;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface AgingQueryDao extends JpaRepository<AgingQuery,Long>, JpaSpecificationExecutor<AgingQuery> {

    @Query("select aq from AgingQuery aq where aq.id = :id ")
    AgingQuery find(@Param("id")Long id);

    AgingQuery findByOriginAndDestination(String origin,String destination);

}
